<div class="content1" href="">
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <title>运营审核页面</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/base.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <link href="css/layer.css" rel="stylesheet">
    <link href="css/pagination.css" rel="stylesheet">
    <link href="css/bootstrap-datetimepicker.css" rel="stylesheet">
    <link href="css/dataTables.bootstrap.min.css" rel="stylesheet">
    <link href="css/jedate.css" rel="stylesheet">
    
    <style>
        #loanDetail{
            background-color: #fff;
            margin-bottom: 15px;
        }
        #loanDetail p{
            padding-left:0 ;
            padding-right: 0;
            margin: 6px 0 ;
        }
        #loanDetail .wd_60{
            display: inline-block;
            width: 102px;
            text-align: right;
            font-size: 12px;
            font-family: "微软雅黑";
        }
        #loanDetail .c13 .wd_60{
            float: left;
            margin-top: 5px;
        }
        #loanDetail .c13 input{
            float: left;
            font-size: 12px;
            font-family: "微软雅黑";
        }
        #loanDetail .col-lg-3 ,#loanDetail .c13{
            margin:5px 0;
            padding-left:5px;
            padding-right: 5px;
        }

        #loanDetail select option{
            font-size: 12px;
            font-family: "微软雅黑";
        }
        .search_btn {
            font-size: 12px;
            background-color: #09C;
            padding: 5px 16px;
            margin-top: 3px;
            margin-bottom: 5px;
        }
        .ta_r{
            width:100%;
        }
        .ta_r div{
        	float:left;
        	display:inline-block;
        }
        .mr_25{
            margin-right: 25px;
        }
    </style>



	<div class="hui"><img src="images/ajax-loader.gif"></div>
	
	<div class="content">
	    <!--面包屑导航start-->
	    <ol class="breadcrumb">
	        <li class="active">财务支出</li>
	    </ol>
	    <!-- 筛选栏--start -->
	    <div id="loanDetail" class="col-lg-12 col-md-12 col-sm-12">
	    	<div class="col-lg-3 col-md-3 col-sm-3"><span class="wd_60">开始日期&nbsp;&nbsp;</span><input type="text" id="startDate" value="" placeholder="请选择时间" readonly=""></div>
	        <div class="col-lg-3 col-md-3 col-sm-3"><span class="wd_60">结束日期&nbsp;&nbsp;</span><input type="text" id="endDate" value="" placeholder="请选择时间" readonly=""></div>
	        <div class="col-lg-3 col-md-3 col-sm-3"><span class="wd_60">商户名称&nbsp;&nbsp;</span><input type="text" id="storeName"></div>
	   		
	   		<div class="col-lg-3 col-md-3 col-sm-3"><span class="wd_60">状态&nbsp;&nbsp;</span>
		      <select id="checkStatus">
		          <option value="">请选择</option>
		          <option value="0">待审核</option>
		          <option value="1">审核通过</option>
		          <option value="2">审核不通过</option>
		          <option value="3">打回</option>
		      </select>
	   	    </div>
	   		 
	        <div class="clear"></div>
	        
	    </div>
	    
	    <div class="col-lg-3 col-md-3 col-sm-3 ta_r">
	    	<div>
	            <button class="btn btn-primary btn-sm search_btn" type="button" id="btn-search">查询</button>&nbsp;&nbsp;&nbsp;&nbsp;
	        </div>
	    </div>
		
		<!-- 筛选栏--end -->  
		
		<!-- 定义财务支出列表 -->    
	    <div class="table-responsive">
	        <div id="operationCheckList_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer"><div class="top"><div class="clear"></div></div><div id="operationCheckList_processing" class="dataTables_processing panel panel-default" style="display: none;">处理中...</div><table id="operationCheckList" style="width: 100%;" class="table table-bordered table-striped table-hover bg_wt dataTable no-footer" role="grid" aria-describedby="operationCheckList_info">
	            <thead style="border-bottom: 0;background-color: #fff;">
	            <tr role="row"><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 59px;"><input class="allCkb" type="checkbox"></th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 149px;">提交时间</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 149px;">商户名称</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 88px;">资方</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 149px;">合计笔数</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 149px;">合计金额</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 88px;">备注</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 88px;">状态</th><th class="text-center fs_13 sorting_disabled" rowspan="1" colspan="1" style="width: 88px;">操作</th></tr>
	            </thead>
	        <tbody><tr class="odd"><td valign="top" colspan="9" class="dataTables_empty">没有符合您搜索条件的信息</td></tr></tbody></table><div class="bottom"><div class="dataTables_info" id="operationCheckList_info" role="status" aria-live="polite">显示第 0 至 0 项结果，共 0 项</div><div class="dataTables_length" id="operationCheckList_length"><label> <select name="operationCheckList_length" aria-controls="operationCheckList" class="form-control input-sm"><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select> </label></div><div class="dataTables_paginate paging_full_numbers" id="operationCheckList_paginate"><ul class="pagination"><li class="paginate_button first disabled" id="operationCheckList_first"><a href="javascript:void(0);" aria-controls="operationCheckList" data-dt-idx="0" tabindex="0">首页</a></li><li class="paginate_button previous disabled" id="operationCheckList_previous"><a href="javascript:void(0);" aria-controls="operationCheckList" data-dt-idx="1" tabindex="0">上页</a></li><li class="paginate_button next disabled" id="operationCheckList_next"><a href="javascript:void(0);" aria-controls="operationCheckList" data-dt-idx="2" tabindex="0">下页</a></li><li class="paginate_button last disabled" id="operationCheckList_last"><a href="javascript:void(0);" aria-controls="operationCheckList" data-dt-idx="3" tabindex="0">末页</a></li></ul></div><div class="clear"></div></div></div>
	    </div>
	</div>
	
	
	<script>
	    $(function(){
	         /* 初始化列表数据--start */
	        dt= $("#operationCheckList").dataTable({
	            "sDom":'<"top"<"clear">>rt<"bottom"ilp<"clear">>',
	            bProcessing:true,
	            pageLength: 10,
	            searching: false, // 禁用dataTables自带的查询框
	            ordering: false, // 禁用排序
	            ajax: {
	                type: "POST",
					url: "/hd/financialExpend/operationCheckListData",
	                data:function(d) {
	                	d.storeName = $("#storeName").val();
	                	d.checkStatus = $("#checkStatus").val();
	                    d.startDate = $("#startDate").val();
	                    d.endDate = $("#endDate").val();
	                }
	            },
	            columns: [
	            	{data: "id",
	                    orderable: false,
	                    render: function(data, type, row) {
	                       return '<input type="checkbox" value="'+data+'"  name="items" class="ckb">';
	                   }},
	                 //提交日期
// 	                {data:"approverTime",render:function(data,type,row){ 
// 						return data.substring(0,10);
// 	                }},

	                {data:"approverTime",render:function(data,type,row){ 
	                	return data.substring(0,data.length-2);
	 	                }},
	                {data:"storeName"},	//商户名称
	                {data:"capitalName"},	//资方名称
	                
// 	                {data:"capitalId",render: function(data, type, row) {
//                         if(1==data){
//                             return "北银";
//                         }else if(2==data){
//                             return "晋城";
//                         }else if(3==data){
//                             return "海尔";
//                         }else if(4==data){
//                             return "安信小贷";
//                         }else if(5==data){
//                             return "百度";
//                         }else if(6==data){
//                             return "闪银3c";
//                         }else if(7==data){
//                             return "海尔租房";
//                         }else if(11==data){
//                             return "贷鱼教育";
//                         }else if(13==data){
//                             return "沃付分期";
//                         }else if(14==data){
//                             return "91金融";
//                         }else if(100==data){
//                             return "Mini循环贷";
//                         }else if(15==data){
//                             return "湖北消费金融";
//                         }else if(16==data){
//                             return "91旺财";
//                         }else if(17==data){
//                             return "晋商教育";
//                         }else if(18==data){
//                             return "晋商租房";
//                         }else{
//                         	return "";
//                         }
//                       }
// 	                },	//资方名称
	                {data:"orderCount"}, //合计笔数
	                {data:"arrivalAmount"},	//合计金额
	                {data:"remark"},	//备注
	                //状态
	                {data:"checkStatus",render:function(data,type,row){ 
	                    if (data=='0') {
	                        return '待审核';
	                    }else if (data=='1') {
	                        return '审核通过';
	                    }else if (data=='2') {
	                        return '审核不通过';
	                    }else if (data=='3') {
	                        return '打回';
	                    }else if (data=='4') {
	                        return '财务审核中';
	                    }
	                }},	
	                {data: "id",render:function(data,type,row){
	                	var operation = "";
	                	//审核状态
	                	var checkStatus= row.checkStatus;
	                	if(checkStatus == 0 ){
	                		operation = "<button type='button'  data-id="+data+" class='btn btn-primary btn-sm ' name='operationCheck'>审核</button>&nbsp;&nbsp;";
		                    return operation; 
	                	 }else if(checkStatus ==3 ){
	                		 operation = "<button type='button'  data-id="+data+" class='btn btn-primary btn-sm ' name='operationCheck'>审核</button>&nbsp;&nbsp;";
			                    return operation;
	                	 }else{
	                		 operation = "<button type='button'  data-id="+data+" class='btn btn-primary btn-sm ' name='operationRemit'>明细</button>&nbsp;&nbsp;";
				                return operation; 
	                	 }
	                   }
	                }
	            ]
	        });
    	/* 初始化列表数据--end */
    	
    	/* 查询按钮 */
        $("#btn-search").click(function(e){
            dt.api().draw();
        });
        /* 返回按钮 */
        $("#return").click(function(e){
        	window.history.go(-1); 
        });
        
    	/* 显示审核页面 */
    	 $("#operationCheckList").on("click","button[name='operationCheck']", function(e){
    		 var $current = $(e.currentTarget);
             var packageId = $current.data("id");
//              var pageIndex=dt.api().page();
//              var pageSize=dt.api().page.len();
//              pageIndex=pageIndex*pageSize;
             conentWin.load("/hd/financialExpend/toOperationCheckInfo?pageFlag=1&id="+packageId );
    		 
    	 });
    	/* 显示明细页面 */
    	 $("#operationCheckList").on("click","button[name='operationRemit']", function(e){
    		 var $current = $(e.currentTarget);
             var packageId = $current.data("id");
//              var pageIndex=dt.api().page();
//              var pageSize=dt.api().page.len();
//              pageIndex=pageIndex*pageSize;
             conentWin.load("/hd/financialExpend/toOperationCheckInfo?pageFlag=2&id="+packageId );
    		 
    	 });
    	
	  });
    </script>
		
	<script>
		/*分页方法 */
	    function page(n,s){
	        $("#pageNo").val(n);
	        $("#pageSize").val(s);
	        $("#searchForm").submit();
	        return false;
	    }
	</script>
	
	<!--单选复选-->
	<script>
	    $(function () {
	        $('.allCkb').click(function () {
	
	            $("input[name='items']").prop("checked", this.checked);
	        });
	        $("[name=items]:checkbox").click(function () {
	            var p = $("[name=items]:checkbox");
	            if (p.filter(':checked').length == p.length) {
	                $(".allCkb").prop("checked", true);
	            } else {
	                $(".allCkb").prop("checked", false);
	            }
	        });
	    });
	</script>
	
	
	<script>
	    var time = 100000;
	    var interval; //调度器对象。
	    function run(){
	        interval = setInterval("fun()",time);
	    }
	    function fun(){
	        $(".hui").css("display","none");
	    }
	    $(function(){
	        $("#reviewList").delegate('tr td button','click',function(){
	            $(this).html("加载中...").attr("disabled","disabled");
	            $(".hui").css("display","block");
	            run();
	        })
	    })
	</script>
	
	
	<script>
	    $(document).ready(function(e) {
	        var counter = 0;
	        if (window.history && window.history.pushState) {
	            $(window).on('popstate', function () {
	                window.history.pushState('forward', null, '#');
	                window.history.forward(1);
	            });
	        }
	        window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
	        window.history.forward(1);
	    });
	</script>
	
	<!-- jedate时间插件 -->
	<script src="jedate/jedate.min.js"></script>
	<script>
	    jeDate({
	        dateCell:"#startDate", //目标元素。由于jedate.js封装了一个轻量级的选择器，因此dateCell还允许你传入class、tag这种方式 '#id .class'
	        format:"YYYY-MM-DD", //日期格式
	        minDate:"1900-01-01", //最小日期
	        maxDate:"2099-12-31", //最大日期
	        isinitVal:false, //是否初始化时间
	        isTime:true, //是否开启时间选择
	        isClear:true, //是否显示清空
	        festival:false, //是否显示节日
	        zIndex:999,  //弹出层的层级高度
	        marks:null, //给日期做标注
	        choosefun:function(val) {},  //选中日期后的回调
	        clearfun:function(val) {},   //清除日期后的回调
	        okfun:function(val) {}       //点击确定后的回调
	    });
	    
	    jeDate({
	        dateCell:"#endDate", //目标元素。由于jedate.js封装了一个轻量级的选择器，因此dateCell还允许你传入class、tag这种方式 '#id .class'
	        format:"YYYY-MM-DD", //日期格式
	        minDate:"1900-01-01", //最小日期
	        maxDate:"2099-12-31", //最大日期
	        isinitVal:false, //是否初始化时间
	        isTime:true, //是否开启时间选择
	        isClear:true, //是否显示清空
	        festival:false, //是否显示节日
	        zIndex:999,  //弹出层的层级高度
	        marks:null, //给日期做标注
	        choosefun:function(val) {},  //选中日期后的回调
	        clearfun:function(val) {},   //清除日期后的回调
	        okfun:function(val) {}       //点击确定后的回调
	    });
	</script>
	
	

</div>